package Com.Hfzk.Bdqn;

import java.util.Scanner;

public class Job03 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        double air_ticket = 5000;
        System.out.print("请输入月份:");
        int month = input.nextInt();
        System.out.println("请选择舱位: 1.头等舱  2.商务舱  3.经济舱");
        int cabin = input.nextInt();
        double Break = 0.0;
        switch (cabin){
            case 1:
                if (month >= 4 && month <= 10){
                    Break = 0.9;
                    double biy = air_ticket * Break;
                    System.out.print("机票价格为:" + biy);
                } else if (month >= 3 && month <= 11){
                    Break = 0.5;
                    double biy = air_ticket * Break;
                    System.out.print("机票价格为:" +biy);
                }
                break;
            case 2:
                if (month >= 4 && month <= 10){
                    Break = 0.8;
                    double biy = air_ticket * Break;
                    System.out.print("机票价格为:" + biy);
                } else if (month >= 3 && month <= 11){
                    Break = 0.4;
                    double biy = air_ticket * Break;
                    System.out.print("机票价格为:" +biy);
                }
                break;
            case 3:
                if (month >= 4 && month <= 10){
                    Break = 0.7;
                    double biy = air_ticket * Break;
                    System.out.print("机票价格为:" + biy);
                } else if (month >= 3 && month <= 11){
                    Break = 0.3;
                    double biy = air_ticket * Break;
                    System.out.print("机票价格为:" +biy);
                }
                break;
            default:
                System.out.println("选择错误!");
                break;
        }
    }
}
